#!/usr/bin/env python
#
# Start up the Nurse Station user interface.

import Tkinter
from Tkinter import Tk
import monitor.nurse
from monitor.nurse import NurseStation
import threading
import argparse

if __name__ == '__main__':

	parser = argparse.ArgumentParser(description="Start the Bed Monitor UI.")
	parser.add_argument("cport", type=int, help="Port to listen on for a data collector.")
	parser.add_argument("aport", type=int, help="Port to listen on for alarms.")
	args = parser.parse_args()

	root = Tk()
	app = NurseStation(root, "1")
	app.addListener(args.cport)
	app.addListener(args.aport)

	root.title("Nurse's Monitor")
	root.bind('<Return>', root.quit)
	app.start()
	root.mainloop()

